package com.ruoyi.web.otherService;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.sunjob.common.domain.img.SysImg;
import com.sunjob.common.result.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * 图片三方服务
 * @create 2022-08-11 10:13
 */
@FeignClient("MROIMGSERVER")
@Component
public interface ImgService {
    @GetMapping("/queryAllImg")
    Result<List<SysImg>> getAllImg();

    @GetMapping("/getImgById/{imgId}")
    Result<SysImg> getImgById(@PathVariable("imgId") Long imgId);

    @PostMapping("/pullImgBy")
    Result<List<SysImg>> pullImgBy(@RequestBody SysImg img);

    /**
     * 推送图片
     * @param sysImg
     * @return
     */
    @PostMapping("/pushImg")
    Result<SysImg> pushImg(@RequestBody SysImg sysImg);
}
